<!doctype html>
<html class="m_xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="copyright" content=""/>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
	<title>首页</title>
	<link rel="stylesheet" type="text/css" href="open/css/public.css" />
  <link rel="stylesheet" type="text/css" href="open/css/base.css" />
	<script src="open/js/jquery.js"></script>
</head>
<body class="m_xback">
	<div class="m_xbg4">
		<div class="m_xwraps">
			<div class="m_xnavs">
				<i><img src="img/logo.png" /></i>
				<a href="products.html">产品与设备</a>
				<a href="solution.html">解决方案</a>
				<a href="services.html">系统与服务</a>
				<a href="cooperation.html">业务合作</a>
				<a href="open.html">开放平台</a>
				<a href="about.html">关于三伍科技</a>
			</div>
			<div class="m_xheight"></div>
		</div>
	</div>
	<div class="m_xinfor">
		<h2>携手互联  慧及未来</h2>
		<strong><img src="open/images//title.png" /></strong>
		<div class="m_xchunk">
			<div class="title">
				<em class="company on">个人</em>
				<em class="company">公司</em>
			</div>
			<div class="line">
				<span>姓&emsp;&emsp;名：</span>
				<div class="right">
					<input type="text" id="name" placeholder="" class="text" />
				</div>
			</div>
			<div class="line">
				<span>电&emsp;&emsp;话：</span>
				<div class="right">
					<input type="text" id="phone" placeholder="" class="text" />
				</div>
			</div>
			<div class="line">
				<span>地&emsp;&emsp;址：</span>
				<div class="right">
					<textarea id="address"></textarea>
				</div>
			</div>
			<div class="line">
				<span>设备类型：</span>
				<div class="right">
					<div class="types">
						<em class="type">电动自行车</em>
						<em class="type">新能源汽车</em>
						<em class="type">充电柜</em>
					</div>
				</div>
			</div>
			<div class="line">
				<span></span>
				<div class="right">
					<a href="javascript:void(0);" onclick="toSubmit()" class="nus">提交</a>
				</div>
			</div>
		</div>
	</div>

	<footer class="m_xfooter">
		<div class="mians">
			<i><img src="open/images/code_1.png" /></i>
			<i><img src="open/images/code_2.png" /></i>
			<i><img src="open/images/code_3.png" /></i>
			<div class="give">
				<div class="tel">
					<img src="open/images/tel.png" />
					<div class="right">
						<h3>400-518-6018</h3>
						<span>联系邮箱：contact@sanwunet.com</span>
					</div>
				</div>
				<p>公司地址：北京市朝阳区万科时代中心4层</p>
				<p>Copyright © 2021 SANWUNET,Inc 京ICP备17035515号</p>
				<p>All Rights Reserved</p>
				<p>北京三伍科技有限公司 版权所有</p>
			</div>
		</div>
	</footer>
	<script>
		$(".type").click(function(){
			if($(this).hasClass("on")){
				$(this).removeClass("on");
			}else {
				$(this).addClass("on");
			}
		});
		$(".company").click(function(){
			$(".company").removeClass("on");
			$(this).addClass("on");
		});
		function toSubmit() {
			var company = $(".title .on").text();
			var name = $("#name").val();
			var phone = $("#phone").val();
			var address = $("#address").val();
			var typss = "";
			var typsObject = $(".types .on");
			for(var i=0;i<typsObject.length;i++){
				if (i == 0) {
					typss += $(typsObject[i]).text();
				}else {
					typss += "," + $(typsObject[i]).text();
				}
			}
			if (name == null || name == '') {
				alert("请填写姓名");
			}
			if (phone == null || phone == '') {
				alert("请填写联系方式");
			}
			var params = {};
			params.company = company;
			params.name = name;
			params.phone = phone;
			params.address = address;
			params.types = typss;
			$.post("http://admin.qpower.cc/oper/api/gw/info/submit",params,function(result){
				var c = confirm("提交成功，我们会在48小时内与您联系！");
				if (c){
					window.location.href="open.html";
				}
		 	});
		}
	</script>
</body>
</html>
